package leetCode.hw.math;

public class HJ100Solution implements HJ100 {

    /**
     * 等差数列求和
     * @param n
     * @return
     */
    @Override
    public long equalsNumSum(int n) {
        long result = 2;
        long sum = result;
        for(int i=1;i<n;i++) {
            result+=3;
            sum+=result;
        }
        return sum;
    }

}
